﻿using System;
using System.Collections.Generic;
using CS.Task.DataTransfer;
using NUnit.Framework;

namespace CS.Scheduling.Test.DataTransfer
{
    [TestFixture]
    public class DataImportTests
    {
        #region Setup/Teardown

        [SetUp]
        public void InitImplent()
        {
            _dataImporter = new DataImporter();
            _userInfos = new List<UserInfo>
                             {
                                 new UserInfo {No = 1, Name = "zhouyu", Age = 28},
                                 new UserInfo {No = 2, Name = "yushufei", Age = 29},
                                 new UserInfo {No = 3, Name = "mengfanjiang", Age = 28},
                                 new UserInfo {No = 4, Name = "xxx", Age = 25}
                             };
        }

        #endregion

        private DataImporter _dataImporter;
        private List<UserInfo> _userInfos;

        [Test]
        public void BackupDataTest()
        {
            var o = _userInfos as object;


            //CS.Data.Storage.FileStorage.Save(@"D:\Temp\Temp.xml",o);
        }
    }

    [Serializable]
    public class UserInfo
    {
        public int No { get; set; }

        public string Name { get; set; }

        public int Age { get; set; }
    }
}